Skip to content

fix: Update "How Should I Query?" links to use the correct URLs #580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 26, 2020

Conversation

ryanjwessel
Copy link
Contributor

This addresses #579

Summary

This updates the "How Should I Query?" links to use the correct URLs for each query type.

Test plan

I verified these URLs are all correct.

Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't prefixing the existing links with /docs/ help? If not, we can leave absolute paths, but relative would be preferable

@ryanjwessel
Copy link
Contributor Author

ryanjwessel commented Oct 26, 2020

I tested while running the website locally, and prefixing with docs/ results in this URL (note the duplicate docs/): http://localhost:3000/react-native-testing-library/docs/docs/api-queries#bytext

Turns out, the relative paths were working locally, but when they are hosted in production they are incorrect.

Local relative path: http://localhost:3000/react-native-testing-library/docs/api-queries#bytext
Production relative path: https://callstack.github.io/react-native-testing-library/docs/how-should-i-query/api-queries#bydisplayvalue

Given that, it probably makes sense to default to using absolute paths, unless the relative path is included in the same Markdown file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants